﻿using Crowler.Dispatcher.BusinessComponents;
using Crowler.Model.CoreComponents.DataAccess;
using Crowler.Model.Dispetcher.DataAccess;
using Crowler.Model.Dispetcher.Domain;
using NHibernate;

namespace Crowler.Dispatcher.DataAccess
{
    public class DiscoverableEntryEntryRepository : IDiscoverableEntryRepository
    {
        private readonly ISession _session;

        public DiscoverableEntryEntryRepository(ISessionProvider sessionProvider)
        {
            _session = sessionProvider.Session;
        }


        public IDiscoverableEntry FirstEntryToDiscover()
        {
            _session.Save(new DiscoverableEntry { Category = "gomno", Discontinued = false, Name = "gomno" });
            return null;
        }
    }
}
